package com.keldian.zhbj74.base;

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
import com.keldian.zhbj74.R;
import com.keldian.zhbj74.activity.MainActivity;

import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;

public class BasePager {
	
	public Activity mActivity;
	
	public TextView tvTitle;
	public ImageButton btnMenu;
	public FrameLayout flContent;
	public View mRootView;
	
	public ImageButton btnPhoto;//组图切换按钮
	
	public BasePager(Activity activity) {
		mActivity = activity;
		mRootView = initView();
	}

	public View initView(){
		View view = View.inflate(mActivity, R.layout.base_pager, null);
		tvTitle = (TextView) view.findViewById(R.id.tv_title);
		btnMenu = (ImageButton) view.findViewById(R.id.btn_menu);
		flContent = (FrameLayout) view.findViewById(R.id.fl_content);
		
		btnPhoto = (ImageButton) view.findViewById(R.id.btn_photo);
		
		btnMenu.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				MainActivity mainUI = (MainActivity) mActivity;
				SlidingMenu slidingMenu = mainUI.getSlidingMenu();
				slidingMenu.toggle();
			}
		});
		
		
		return view;
	}
	
	public void initData(){
		
	}
	
	
}
